package com.tsystems.school.jabber.DataBase.DAO;

import com.tsystems.school.jabber.DataBase.Entities.User;

/**
 * Created by IntelliJ IDEA.
 * User: Kirill
 * Date: 24.08.11
 * Time: 2:02
 * To change this template use File | Settings | File Templates.
 */
public class Main {
	public static void main(String[] args){
//		AccessLevel testLvl = new AccessLevel();
//		testLvl.setLevel("Full access");
//		DAO<AccessLevel> aldao = new GenericDAO(AccessLevel.class);
//		Long id = aldao.create(testLvl);
//
//		Admin vasya = new Admin();
//		AccessLevel lvl = aldao.read(testLvl.getId());
//		vasya.setName("vasya");
//		vasya.setLevel(lvl);
//		DAO<Admin> admindao = new GenericDAO(Admin.class);
//		admindao.create(vasya);
//
		UserDAO userDAO = DAOFactory.getUserDAO();
		User art666 = new User("Sotona", "666", null, "1.1.1.1");
//		userDAO.create(art666);
/*		User userXXX = new User("UserXXX", "xxx", null,  "2.2.2.2");
//		userDAO.create(userXXX);
//		User uberMan = new User("UberMan", "123", null,  "3.3.3.3");
//		userDAO.create(uberMan);  */
		boolean busy = userDAO.isLoginBusy(art666.getLogin());
		User user = userDAO.getByLogin(art666.getLogin());
	}
}
